package com.bwie.controller;

import com.bwie.service.UserService;
import com.bwie.utils.R;
import com.bwie.vo.LoginInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: Sokai
 * @Date: 2024/9/25 20:13
 * @Description:
 **/
@RestController
@RequestMapping("/auth/user")
public class UserController {
    @Autowired
    private UserService userService;

    @PostMapping("userLogin")
    public R userLogin(@RequestBody LoginInfoVo loginInfoVo) {
        return userService.userLogin(loginInfoVo);
    }

    @PostMapping("/uploadFile")
    public R uploadFile(@RequestPart("file")MultipartFile file){
        return userService.uploadFile(file);
    }
}
